﻿using System.Windows;

namespace Leow.SelectableCanvas
{
    public class CustomPositionChangedEventArgs : RoutedEventArgs
    {
        private readonly Point _newPosition;
        private readonly Point _oldPosition;

        public CustomPositionChangedEventArgs(
            Point oldPosition,
            Point newPosition)
        {
            _oldPosition = oldPosition;
            _newPosition = newPosition;
        }

        public Point NewPosition
        {
            get
            {
                return _newPosition;
            }
        }

        public Point OldPosition
        {
            get
            {
                return _oldPosition;
            }
        }

        public double XOffset
        {
            get
            {
                return NewPosition.X - OldPosition.X;
            }
        }

        public double YOffset
        {
            get
            {
                return NewPosition.Y - OldPosition.Y;
            }
        }
    }
}
